
cmake_minimum_required(VERSION 2.8.7)

project(jjpeg_native)

set(BUILD_SHARED_LIBS 0)

set ( CMAKE_VERBOSE_MAKEFILE true )

if(NOT LIBRARY_OUTPUT_PATH)
    set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")

    mark_as_advanced(LIBRARY_OUTPUT_PATH)
endif()

if (WIN32)
    SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc" )
endif ()

set(LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})
set(RUNTIME_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})
set(ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})


add_subdirectory(libjpeg)
add_subdirectory(libcharls)
add_subdirectory(libImageCodec)